package org.eweb4j.config.bean;

import org.eweb4j.util.xml.tag.XmlTag;
import org.eweb4j.util.xml.tag.XmlTagType;

/**
 * EWeb4J用来存取配置信息的bean
 * 
 * @author cfuture.aw
 * @since v1.a.0
 * 
 */
public class ConfigORM {
	@XmlTag(value = "false")
	private String open;
	@XmlTag(type = "", value = "true")
	private String debug;
	@XmlTag(type = "", value = "logs/orm.log")
	private String logFile;
	@XmlTag(type = "", value = "5")
	private String logMaxSize;
	@XmlTag(value = "com.mchange.v2.c3p0.ComboPooledDataSource")
	private String dataSource;//数据源类完整路径，默认c3p0
	@XmlTag(type = XmlTagType.classType)
	private ScanPojoPackage scanPojoPackage;
	@XmlTag(type = XmlTagType.classType)
	private ORMXmlFiles ormXmlFiles;
	@XmlTag(type = XmlTagType.classType)
	private DBInfoXmlFiles dbInfoXmlFiles;
//	@XmlTag(type = XmlTagType.attriType, value = "org.eweb4j.config.bean.ConfigORM")
//	private String xmlBean = this.getClass().getName();
	
	@Override
	public String toString() {
		return "ConfigORM [open=" + open + ", debug=" + debug + ", logFile="
				+ logFile + ", logMaxSize=" + logMaxSize + ", dataSource="
				+ dataSource + ", scanPojoPackage=" + scanPojoPackage
				+ ", ormXmlFiles=" + ormXmlFiles + ", dbInfoXmlFiles="
				+ dbInfoXmlFiles + "]";
	}

	public String getOpen() {
		return open;
	}

	public void setOpen(String open) {
		this.open = open;
	}

	public String getDebug() {
		return debug;
	}

	public void setDebug(String debug) {
		this.debug = debug;
	}

	public String getLogFile() {
		return logFile;
	}

	public String getDataSource() {
		return dataSource;
	}

	public void setDataSource(String dataSource) {
		this.dataSource = dataSource;
	}

	public ScanPojoPackage getScanPojoPackage() {
		return scanPojoPackage;
	}

	public void setScanPojoPackage(ScanPojoPackage scanPojoPackage) {
		this.scanPojoPackage = scanPojoPackage;
	}

	public ORMXmlFiles getOrmXmlFiles() {
		return ormXmlFiles;
	}

	public void setOrmXmlFiles(ORMXmlFiles ormXmlFiles) {
		this.ormXmlFiles = ormXmlFiles;
	}

	public void setLogFile(String logFile) {
		this.logFile = logFile;
	}

	public DBInfoXmlFiles getDbInfoXmlFiles() {
		return dbInfoXmlFiles;
	}

	public void setDbInfoXmlFiles(DBInfoXmlFiles dbInfoXmlFiles) {
		this.dbInfoXmlFiles = dbInfoXmlFiles;
	}

//	public String getXmlBean() {
//		return xmlBean;
//	}
//
//	public void setXmlBean(String xmlBean) {
//		this.xmlBean = xmlBean;
//	}

	public String getLogMaxSize() {
		return logMaxSize;
	}

	public void setLogMaxSize(String logMaxSize) {
		this.logMaxSize = logMaxSize;
	}
}
